import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../components/Home.vue'
import welcome from '../components/welcome.vue'
import webTechOne from '../components/web/webTechOne.vue'

Vue.use(VueRouter)

const routes = [{
    path: '/',
    redirect: '/welcome',
    component: Home,
    children: [
        // 子路由
        { path: '/welcome', component: welcome },
        { path: '/webTechOne', component: webTechOne }
    ]
}]

const router = new VueRouter({
    routes
})

export default router